/**
 * 
 */
package com.fox.webapp.service;

import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.List;

import jxl.read.biff.BiffException;

import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;

import com.fox.webapp.domain.Account;
import com.fox.webapp.domain.CommissionRecord;
import com.fox.webapp.domain.Person;

/**
 * @author yockii
 *
 */
public interface IAccountService {

	Account addNewAccount(Account account, String brokerId, Person person);

	boolean removeMyAccount(Person person, String accountId);

	List<Account> getMyAccounts(Person p);

	boolean updateAccountName(Person person, Account account);

	int addCommission(String brokerName, String accountNo, Double commission, Date time);

	Page<CommissionRecord> getMyCommission(Account account, int page, int size);

	Account getAccount(ObjectId id);

	long getMyAccountCount(Person p);

	Page<Account> getAccountWithCondition(Account account, int page,
			int getiDisplayLength);

	String recordCommissionWithExcel(InputStream inputStream) throws BiffException, IOException;

	int commissionRefundDone(Account account, Double commissionRefund);
}
